package com.hnust.api;

import com.hnust.domain.QuestionAnswer;
import com.hnust.domain.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import retrofit2.http.POST;

@Component
@FeignClient(
        name = "getAnswerApi",
        url = "${feign.baseUrls}"
//        url = "http://127.0.0.1:4523/m1/695559-0-default"
)
public interface getAnswer_testApi {
    @GetMapping(value = "/check/getAnswer")
    Result<QuestionAnswer> getQueDetailMsg(
            @RequestParam("testId") String testId,
            @RequestParam("questionId") String questionId,
            @RequestParam("studentId") String studentId,
            @RequestParam("questionType") String questionType,
            @RequestParam("number") String number
    );
    @PostMapping(value = "/check/addAnnotation")
    Result<Object>  addAnnotation(@RequestParam("stuId") String stuId,
                                          @RequestParam("testId") String testId,
                                          @RequestParam("queId") String queId,
                                          @RequestParam("annoMsg") String annoMsg);
}
